//
//  EditComViewController.m
//  Kfangchan
//
//  Created by 朋飞 on 14-12-8.
//  Copyright (c) 2014年 Beijing Renjuren Network Technology Co., Ltd. All rights reserved.
//

#import "EditComViewController.h"

@interface EditComViewController ()

@end

@implementation EditComViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    // 返回
    self.navigationItem.titleView = [[Theam currentTheam] navigationTitleViewWithTitle:@"修改所属公司"];
    self.navigationItem.leftBarButtonItem = [[Theam currentTheam] navigationBarLeftButtonItemWithImage:[UIImage imageNamed:@"nav_back.png"] Target:self Selector:@selector(back)];
    
    
    // Do any additional setup after loading the view from its nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)call:(id)sender
{
    UIAlertView *alterView = [[UIAlertView alloc] initWithTitle:nil message:[NSString stringWithFormat:@"拨打电话:%@", @"4006-999-068"] delegate:self cancelButtonTitle:@"取消" otherButtonTitles: @"确定", nil];
    [alterView show];
    
}

- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex {
    if (buttonIndex != alertView.cancelButtonIndex) {
        NSString *phone = @"4006999068";
        NSString *tel = [NSString stringWithFormat:@"tel://%@", phone];
        
        if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:tel]]) {
            [[UIApplication sharedApplication] openURL:[NSURL URLWithString:tel]];
        }
    }
}

#pragma mark 返回
#pragma mark
- (void)back {
    [self.navigationController popViewControllerAnimated:YES];
}


@end
